package cn.itsource.org.service.impl;

import cn.itsource.basic.service.BaseServiceImpl;
import cn.itsource.basic.util.PageList;
import cn.itsource.org.domain.Employee;
import cn.itsource.org.mapper.EmployeeMapper;
import cn.itsource.org.query.EmployeeQuery;
import cn.itsource.org.service.IEmployeeService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service //交给spring容器管理
@Transactional //强制事务
public class EmployeeServiceImpl extends BaseServiceImpl<Employee,EmployeeQuery> implements IEmployeeService {

    /**
     * 注入mapper层
     */
    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public List<Employee> managers() {
        return employeeMapper.findManagers();

    }
}
